AppKit is available on eight frameworks, including React, Next.js, Vue, JavaScript, React Native, Flutter, Android, iOS, and Unity.Now, let’s create a Next app. In order to do so, please run the command given below:
You can also use other package managers such asyarn
,bun
,pnpm
, etc.
HTTPS
URL under “Public” as this will be your Virtual TestNet’s RPC URL.
.env
file. On the root level of your code directory, create a new file named .env
.
Open that file and create a new variable NEXT_PUBLIC_PROJECT_ID
. You will assign the project Id that you copied in the previous step to this environment variable that you just created. You need to do the same for TENDERLY_VIRTUAL_TESTNET_RPC
. This is what it will look like:
NEXT_PUBLIC
will be exposed by your app which can be misused by bad actors./app
directory, create a new file named tenderly.config.ts
. Now, paste the code snippet shared below inside the code file, i.e., app/tenderly.config.ts
.
id
- set this to the chain Id that you passed while creating the Virtual TestNet on Tenderly.url
- set this with your your Virtual TestNet’s explorer URL. You can find this URL within your Virtual TestNet’s configuration on Tenderly Dashboard.config/index.tsx
file, import vTestnet
from app/tenderly.config.ts
. You’ll also need to configure transports within the WagmiAdapter
function. Refer to the code snippet below.
context/index.tsx
file, you also need to import vTestnet
and pass it as one of the supported networks within the createAppKit
function, as shown below.
If you are using alternative package managers, you can try either of these commands -yarn dev
, orpnpm dev
, orbun dev
.